home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1995 November
/
EnigmA AMIGA RUN 02 (1995)(G.R. Edizioni)(IT)[!][issue 1995-11][Skylink CD].iso
/
earcd
/
util
/
text
/
xes.lha
/
XES
/
REXX
/
LoadFile.xdme
< prev
next >
Wrap
Text File
|
1995-08-01
|
1KB
|
47 lines
/* $VER: LoadFile.xdme 1.0 (01 Aug 1995) */
/* Copyright © 1995 Fergus Duniho */
OPTIONS RESULTS
ADDRESS 'XDME.1'
'rxresult $filename'
filename = result
IF Exists(filename) THEN DO
CALL Open(input,filename,"R")
type = readch(input,4)
IF type = "XPKF" THEN DO
CALL Seek(input,8,"B")
method = Readch(input,4)
END
ELSE method = "NONE"
CALL Close(input)
END
ELSE method = "NONE"
F = '(' || filename || ')'
IF method = "FEAL" | method = "IDEA" THEN DO
xcom = "execute (copy """ || filename || """ t:temp)"
xcom
body = filename "is encrypted." '0A'x || "Please enter password."
password = rtgetstring(,body,"Password Requester")
xcom = 'execute (xpack t:temp password "' || password || '")'
xcom
newfile 't:temp'
chfilename F
xcom = 'settvar password' password
xcom
END
ELSE newfile F
xsrc = filename || ".xsrc"
IF exists(xsrc) THEN DO
source xsrc
END
ELSE DO
rx1 "XES:Rexx/Mode (" || filename || ")"
END
IF method ~= "NONE" then DO
xcom = 'settvar method' method
xcom
END